package ooww.ssww.strong.wechat

import android.util.Log
import cc.bc.tc.BuildConfig
import cc.bc.tc.R
import com.clean.scanlibrary.utils.SPreference
import eerr.llrr.oorr.pte9983.b.base_api_keep.BaseApplication
import com.meituan.android.walle.WalleChannelReader
import com.manager.core.ad.adconfig.JWAdConfig
/**
 * Created with IntelliJ IDEA.
 * Date: 4/7/16
 * Author: zhangcm
 */
open class BaseKotlinApplication : BaseApplication() {

    //    companion object{
//        @JvmStatic
//        fun getAppContext() : Context? {
//            return instance?.applicationContext
//        }
//    }
    override fun initFactory() {
//        TheApplication.initNomalApp(this)
//        TheApplication.dbInit(this)
        SPreference.setContext(this)
//        FlashlightUtils.init(this)
//        LitePal.initialize(this);
        SPreference.setContext(this)
        val channel = WalleChannelReader.getChannel(this.applicationContext, "10")
        Log.i("ddd==", "channel===" + channel)
        yyee.llee.mmee.pl190.host668.GlobalConfig.setCHANNEL(channel)
        val moduleConfig =
            yyee.llee.mmee.base_api_factory.ModuleConfig(getString(R.string.app_name))

        yyee.llee.mmee.common.global.Env(
            false,
            BuildConfig.VERSION_NAME,
        )

        if (yyee.llee.mmee.pl190.host668.GlobalConfig.isGrowMore) {
            JWAdConfig.getInstance().adMode =
                JWAdConfig.AdMode.GM
        } else {
            JWAdConfig.getInstance().adMode =
                JWAdConfig.AdMode.TOPON
        }
        yyee.llee.mmee.pl190.host668.BFactory.setWallPage(R.drawable.wall_pager)
//        BFactory.setWelActivity(WelcomeActivity::class.java);

    }
}